projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
786e9d3
)
Validate arguments
author
Emmanuele Bassi
<ebassi@gnome.org>
Tue, 26 Jan 2021 12:56:32 +0000
(12:56 +0000)
committer
Emmanuele Bassi
<ebassi@gnome.org>
Tue, 26 Jan 2021 12:56:32 +0000
(12:56 +0000)
We're just assuming everything is not NULL or with a valid type.
gdk/gdksurface.c
patch
|
blob
|
history
diff --git
a/gdk/gdksurface.c
b/gdk/gdksurface.c
index aaeb6d21b4299e046ef380c595cf55e46736d0f2..31c5b44b73215e4317487b21ec66c1f17d7a83d4 100644
(file)
--- a/
gdk/gdksurface.c
+++ b/
gdk/gdksurface.c
@@
-2984,6
+2984,11
@@
gdk_surface_translate_coordinates (GdkSurface *from,
int x1, y1, x2, y2;
GdkSurface *f, *t;
+ g_return_val_if_fail (GDK_IS_SURFACE (from), FALSE);
+ g_return_val_if_fail (GDK_IS_SURFACE (to), FALSE);
+ g_return_val_if_fail (x != NULL, FALSE);
+ g_return_val_if_fail (y != NULL, FALSE);
+
in_x = *x;
in_y = *y;